<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BlueKing</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
        .exception-wrapper {
            display: flex;
            flex-direction: column;
            width: 100vw;
            height: 100vh;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            font-family: PingFang SC, Microsoft Yahei, Helvetica, Aria;
            color: #63656e;
        }
        .exception-wrapper p {
            color: #979ba5;
            font-size: 14px;
            margin: 14px 0 0 0;
        }
        .exception-wrapper h3 {
            font-size: 24px;
            margin: 14px 0 0 0;
        }
        .exception-image {
            width: 200px;
            height: 200px;
            object-fit: cover;
            object-position: center;
        }
    </style>
</head>
<body>
    <script>
        function getCookie(cname) {
            try {
                var name = cname + '='
                var decodedCookie = decodeURIComponent(document.cookie)
                var ca = decodedCookie.split(';')
                for (var i = 0; i < ca.length; i++) {
                    var c = ca[i]
                    while (c.charAt(0) == ' ') {
                    c = c.substring(1)
                    }
                    if (c.indexOf(name) == 0) {
                    return c.substring(name.length, c.length)
                    }
                }
                return ''
            } catch (e) {
            console.error('get cookie error', e.message)
                return ''
            }
        }

        window.onload = function () {
            var lang = getCookie('blueking_language');
            var query = new URLSearchParams(window.location.search);
            var queryMessage = query.get('message') || 'admin'
            var title = '蓝鲸 403'
            var h3 = '无该应用访问权限'
            var p = queryMessage
            switch (lang) {
                case 'en':
                    title = 'BlueKing 403'
                    h3 = 'No access to this application'
                    break;
            }
            document.title = title
            document.querySelector('h3').innerHTML = h3
            document.querySelector('p').innerHTML = p
            
        }
    </script>
    <main class="exception-wrapper">
        <img  alt="403" class="exception-image" src="" />
        <h3></h3>
        <p></p>
    </main>
</body>
</html>
